#!/usr/bin/env python
# -*- coding: utf-8 -*-

from collections import defaultdict
from RGM import RGM as rgm
from helpers import get_sorted_tuple as gst
import sqlite3 as sqlite

# список подписок [(uid, item), ]
subscriptions = rgm

conn = sqlite.connect('items.db')
c = conn.cursor()
c.executemany("insert into subscriptions (uid, item) values (?, ?)", subscriptions)

conn.commit()
c.close()

